\(\int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) [165]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 174 \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {56 \sin (c+d x)}{143 a^4 d}-\frac {56 \sin ^3(c+d x)}{143 a^4 d}+\frac {168 \sin ^5(c+d x)}{715 a^4 d}-\frac {8 \sin ^7(c+d x)}{143 a^4 d}+\frac {i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac {9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac {16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )} \]

[Out]

56/143*sin(d*x+c)/a^4/d-56/143*sin(d*x+c)^3/a^4/d+168/715*sin(d*x+c)^5/a^4/d-8/143*sin(d*x+c)^7/a^4/d+1/13*I*c
os(d*x+c)^5/d/(a+I*a*tan(d*x+c))^4+9/143*I*cos(d*x+c)^5/a/d/(a+I*a*tan(d*x+c))^3+16/143*I*cos(d*x+c)^7/d/(a^4+
I*a^4*tan(d*x+c))

Rubi [A] (verified)

Time = 0.20 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3583, 3581, 2713} \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {8 \sin ^7(c+d x)}{143 a^4 d}+\frac {168 \sin ^5(c+d x)}{715 a^4 d}-\frac {56 \sin ^3(c+d x)}{143 a^4 d}+\frac {56 \sin (c+d x)}{143 a^4 d}+\frac {16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac {i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4} \]

[In]

Int[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(56*Sin[c + d*x])/(143*a^4*d) - (56*Sin[c + d*x]^3)/(143*a^4*d) + (168*Sin[c + d*x]^5)/(715*a^4*d) - (8*Sin[c
+ d*x]^7)/(143*a^4*d) + ((I/13)*Cos[c + d*x]^5)/(d*(a + I*a*Tan[c + d*x])^4) + (((9*I)/143)*Cos[c + d*x]^5)/(a
*d*(a + I*a*Tan[c + d*x])^3) + (((16*I)/143)*Cos[c + d*x]^7)/(d*(a^4 + I*a^4*Tan[c + d*x]))

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 3581

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[2*d^2*
(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + 2*n))), x] - Dist[d^2*((m - 2)/(b^2*(m + 2*n)
)), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a
^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (Integers
Q[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]

Rule 3583

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(d*
Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/(b*f*(m + 2*n))), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rubi steps \begin{align*} \text {integral}& = \frac {i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac {9 \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^3} \, dx}{13 a} \\ & = \frac {i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac {9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac {72 \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{143 a^2} \\ & = \frac {i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac {9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac {16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {56 \int \cos ^7(c+d x) \, dx}{143 a^4} \\ & = \frac {i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac {9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac {16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {56 \text {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{143 a^4 d} \\ & = \frac {56 \sin (c+d x)}{143 a^4 d}-\frac {56 \sin ^3(c+d x)}{143 a^4 d}+\frac {168 \sin ^5(c+d x)}{715 a^4 d}-\frac {8 \sin ^7(c+d x)}{143 a^4 d}+\frac {i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac {9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac {16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.24 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.80 \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {i \sec ^4(c+d x) (-24024 \cos (c+d x)-34320 \cos (3 (c+d x))+11440 \cos (5 (c+d x))+780 \cos (7 (c+d x))+44 \cos (9 (c+d x))-6006 i \sin (c+d x)-25740 i \sin (3 (c+d x))+14300 i \sin (5 (c+d x))+1365 i \sin (7 (c+d x))+99 i \sin (9 (c+d x)))}{183040 a^4 d (-i+\tan (c+d x))^4} \]

[In]

Integrate[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x])^4,x]

[Out]

((-1/183040*I)*Sec[c + d*x]^4*(-24024*Cos[c + d*x] - 34320*Cos[3*(c + d*x)] + 11440*Cos[5*(c + d*x)] + 780*Cos
[7*(c + d*x)] + 44*Cos[9*(c + d*x)] - (6006*I)*Sin[c + d*x] - (25740*I)*Sin[3*(c + d*x)] + (14300*I)*Sin[5*(c
+ d*x)] + (1365*I)*Sin[7*(c + d*x)] + (99*I)*Sin[9*(c + d*x)]))/(a^4*d*(-I + Tan[c + d*x])^4)

Maple [A] (verified)

Time = 0.75 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.99

method result size
risch \(\frac {3 i {\mathrm e}^{-7 i \left (d x +c \right )}}{128 a^{4} d}+\frac {i {\mathrm e}^{-9 i \left (d x +c \right )}}{128 a^{4} d}+\frac {9 i {\mathrm e}^{-11 i \left (d x +c \right )}}{5632 a^{4} d}+\frac {i {\mathrm e}^{-13 i \left (d x +c \right )}}{6656 a^{4} d}+\frac {3 i \cos \left (d x +c \right )}{32 a^{4} d}+\frac {15 \sin \left (d x +c \right )}{64 a^{4} d}+\frac {25 i \cos \left (5 d x +5 c \right )}{512 a^{4} d}+\frac {127 \sin \left (5 d x +5 c \right )}{2560 a^{4} d}+\frac {39 i \cos \left (3 d x +3 c \right )}{512 a^{4} d}+\frac {45 \sin \left (3 d x +3 c \right )}{512 a^{4} d}\) \(173\)
derivativedivides \(\frac {-\frac {135 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}+\frac {i}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{4}}+\frac {1}{80 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{5}}-\frac {5}{64 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {23}{128 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}-\frac {1375 i}{32 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {465 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {8 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{12}}+\frac {825 i}{128 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {62 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{10}}-\frac {11 i}{128 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {16}{13 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{13}}-\frac {300}{11 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{11}}+\frac {104}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {279}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {6291}{80 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {1207}{64 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {233}{128 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{4} d}\) \(306\)
default \(\frac {-\frac {135 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}+\frac {i}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{4}}+\frac {1}{80 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{5}}-\frac {5}{64 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {23}{128 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}-\frac {1375 i}{32 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {465 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {8 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{12}}+\frac {825 i}{128 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {62 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{10}}-\frac {11 i}{128 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {16}{13 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{13}}-\frac {300}{11 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{11}}+\frac {104}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {279}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {6291}{80 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {1207}{64 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {233}{128 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{4} d}\) \(306\)

[In]

int(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)

[Out]

3/128*I/a^4/d*exp(-7*I*(d*x+c))+1/128*I/a^4/d*exp(-9*I*(d*x+c))+9/5632*I/a^4/d*exp(-11*I*(d*x+c))+1/6656*I/a^4
/d*exp(-13*I*(d*x+c))+3/32*I/a^4/d*cos(d*x+c)+15/64*sin(d*x+c)/a^4/d+25/512*I/a^4/d*cos(5*d*x+5*c)+127/2560/a^
4/d*sin(5*d*x+5*c)+39/512*I/a^4/d*cos(3*d*x+3*c)+45/512/a^4/d*sin(3*d*x+3*c)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.68 \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\left (-143 i \, e^{\left (18 i \, d x + 18 i \, c\right )} - 2145 i \, e^{\left (16 i \, d x + 16 i \, c\right )} - 25740 i \, e^{\left (14 i \, d x + 14 i \, c\right )} + 60060 i \, e^{\left (12 i \, d x + 12 i \, c\right )} + 30030 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 18018 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 8580 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 2860 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 585 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 55 i\right )} e^{\left (-13 i \, d x - 13 i \, c\right )}}{366080 \, a^{4} d} \]

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/366080*(-143*I*e^(18*I*d*x + 18*I*c) - 2145*I*e^(16*I*d*x + 16*I*c) - 25740*I*e^(14*I*d*x + 14*I*c) + 60060*
I*e^(12*I*d*x + 12*I*c) + 30030*I*e^(10*I*d*x + 10*I*c) + 18018*I*e^(8*I*d*x + 8*I*c) + 8580*I*e^(6*I*d*x + 6*
I*c) + 2860*I*e^(4*I*d*x + 4*I*c) + 585*I*e^(2*I*d*x + 2*I*c) + 55*I)*e^(-13*I*d*x - 13*I*c)/(a^4*d)

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 367 vs. \(2 (153) = 306\).

Time = 0.50 (sec) , antiderivative size = 367, normalized size of antiderivative = 2.11 \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\begin {cases} \frac {\left (- 1688246017625898163896320 i a^{36} d^{9} e^{54 i c} e^{5 i d x} - 25323690264388472458444800 i a^{36} d^{9} e^{52 i c} e^{3 i d x} - 303884283172661669501337600 i a^{36} d^{9} e^{50 i c} e^{i d x} + 709063327402877228836454400 i a^{36} d^{9} e^{48 i c} e^{- i d x} + 354531663701438614418227200 i a^{36} d^{9} e^{46 i c} e^{- 3 i d x} + 212718998220863168650936320 i a^{36} d^{9} e^{44 i c} e^{- 5 i d x} + 101294761057553889833779200 i a^{36} d^{9} e^{42 i c} e^{- 7 i d x} + 33764920352517963277926400 i a^{36} d^{9} e^{40 i c} e^{- 9 i d x} + 6906460981196856125030400 i a^{36} d^{9} e^{38 i c} e^{- 11 i d x} + 649325391394576216883200 i a^{36} d^{9} e^{36 i c} e^{- 13 i d x}\right ) e^{- 49 i c}}{4321909805122299299574579200 a^{40} d^{10}} & \text {for}\: a^{40} d^{10} e^{49 i c} \neq 0 \\\frac {x \left (e^{18 i c} + 9 e^{16 i c} + 36 e^{14 i c} + 84 e^{12 i c} + 126 e^{10 i c} + 126 e^{8 i c} + 84 e^{6 i c} + 36 e^{4 i c} + 9 e^{2 i c} + 1\right ) e^{- 13 i c}}{512 a^{4}} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(d*x+c)**5/(a+I*a*tan(d*x+c))**4,x)

[Out]

Piecewise(((-1688246017625898163896320*I*a**36*d**9*exp(54*I*c)*exp(5*I*d*x) - 25323690264388472458444800*I*a*
*36*d**9*exp(52*I*c)*exp(3*I*d*x) - 303884283172661669501337600*I*a**36*d**9*exp(50*I*c)*exp(I*d*x) + 70906332
7402877228836454400*I*a**36*d**9*exp(48*I*c)*exp(-I*d*x) + 354531663701438614418227200*I*a**36*d**9*exp(46*I*c
)*exp(-3*I*d*x) + 212718998220863168650936320*I*a**36*d**9*exp(44*I*c)*exp(-5*I*d*x) + 10129476105755388983377
9200*I*a**36*d**9*exp(42*I*c)*exp(-7*I*d*x) + 33764920352517963277926400*I*a**36*d**9*exp(40*I*c)*exp(-9*I*d*x
) + 6906460981196856125030400*I*a**36*d**9*exp(38*I*c)*exp(-11*I*d*x) + 649325391394576216883200*I*a**36*d**9*
exp(36*I*c)*exp(-13*I*d*x))*exp(-49*I*c)/(4321909805122299299574579200*a**40*d**10), Ne(a**40*d**10*exp(49*I*c
), 0)), (x*(exp(18*I*c) + 9*exp(16*I*c) + 36*exp(14*I*c) + 84*exp(12*I*c) + 126*exp(10*I*c) + 126*exp(8*I*c) +
 84*exp(6*I*c) + 36*exp(4*I*c) + 9*exp(2*I*c) + 1)*exp(-13*I*c)/(512*a**4), True))

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negative exponent.

Giac [A] (verification not implemented)

none

Time = 0.78 (sec) , antiderivative size = 249, normalized size of antiderivative = 1.43 \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\frac {143 \, {\left (115 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 405 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 575 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 375 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 98\right )}}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}^{5}} + \frac {166595 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 1409265 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 6232655 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} + 17535375 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 34610004 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 49771722 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 53349582 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 42730974 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 25431835 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 10954229 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3278067 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 614627 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 60094}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{13}}}{91520 \, d} \]

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

1/91520*(143*(115*tan(1/2*d*x + 1/2*c)^4 + 405*I*tan(1/2*d*x + 1/2*c)^3 - 575*tan(1/2*d*x + 1/2*c)^2 - 375*I*t
an(1/2*d*x + 1/2*c) + 98)/(a^4*(tan(1/2*d*x + 1/2*c) + I)^5) + (166595*tan(1/2*d*x + 1/2*c)^12 - 1409265*I*tan
(1/2*d*x + 1/2*c)^11 - 6232655*tan(1/2*d*x + 1/2*c)^10 + 17535375*I*tan(1/2*d*x + 1/2*c)^9 + 34610004*tan(1/2*
d*x + 1/2*c)^8 - 49771722*I*tan(1/2*d*x + 1/2*c)^7 - 53349582*tan(1/2*d*x + 1/2*c)^6 + 42730974*I*tan(1/2*d*x
+ 1/2*c)^5 + 25431835*tan(1/2*d*x + 1/2*c)^4 - 10954229*I*tan(1/2*d*x + 1/2*c)^3 - 3278067*tan(1/2*d*x + 1/2*c
)^2 + 614627*I*tan(1/2*d*x + 1/2*c) + 60094)/(a^4*(tan(1/2*d*x + 1/2*c) - I)^13))/d

Mupad [B] (verification not implemented)

Time = 7.93 (sec) , antiderivative size = 262, normalized size of antiderivative = 1.51 \[ \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {15049\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{128}-\frac {4513\,\sin \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )}{32}+\frac {4513\,\sin \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )}{32}-\frac {15461\,\sin \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )}{64}+\frac {3941\,\sin \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )}{64}-\frac {183\,\sin \left (\frac {11\,c}{2}+\frac {11\,d\,x}{2}\right )}{32}+\frac {183\,\sin \left (\frac {13\,c}{2}+\frac {13\,d\,x}{2}\right )}{32}-\frac {99\,\sin \left (\frac {15\,c}{2}+\frac {15\,d\,x}{2}\right )}{256}+\frac {99\,\sin \left (\frac {17\,c}{2}+\frac {17\,d\,x}{2}\right )}{256}+\frac {\cos \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )\,3003{}\mathrm {i}}{32}-\frac {\cos \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )\,3003{}\mathrm {i}}{32}+\frac {\cos \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )\,7293{}\mathrm {i}}{32}-\frac {\cos \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )\,1533{}\mathrm {i}}{32}+\frac {\cos \left (\frac {11\,c}{2}+\frac {11\,d\,x}{2}\right )\,103{}\mathrm {i}}{32}-\frac {\cos \left (\frac {13\,c}{2}+\frac {13\,d\,x}{2}\right )\,103{}\mathrm {i}}{32}+\frac {\cos \left (\frac {15\,c}{2}+\frac {15\,d\,x}{2}\right )\,11{}\mathrm {i}}{64}-\frac {\cos \left (\frac {17\,c}{2}+\frac {17\,d\,x}{2}\right )\,11{}\mathrm {i}}{64}\right )\,2{}\mathrm {i}}{715\,a^4\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^{13}\,{\left (\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^5} \]

[In]

int(cos(c + d*x)^5/(a + a*tan(c + d*x)*1i)^4,x)

[Out]

(cos(c/2 + (d*x)/2)*((cos((3*c)/2 + (3*d*x)/2)*3003i)/32 - (cos((5*c)/2 + (5*d*x)/2)*3003i)/32 + (cos((7*c)/2
+ (7*d*x)/2)*7293i)/32 - (cos((9*c)/2 + (9*d*x)/2)*1533i)/32 + (cos((11*c)/2 + (11*d*x)/2)*103i)/32 - (cos((13
*c)/2 + (13*d*x)/2)*103i)/32 + (cos((15*c)/2 + (15*d*x)/2)*11i)/64 - (cos((17*c)/2 + (17*d*x)/2)*11i)/64 + (15
049*sin(c/2 + (d*x)/2))/128 - (4513*sin((3*c)/2 + (3*d*x)/2))/32 + (4513*sin((5*c)/2 + (5*d*x)/2))/32 - (15461
*sin((7*c)/2 + (7*d*x)/2))/64 + (3941*sin((9*c)/2 + (9*d*x)/2))/64 - (183*sin((11*c)/2 + (11*d*x)/2))/32 + (18
3*sin((13*c)/2 + (13*d*x)/2))/32 - (99*sin((15*c)/2 + (15*d*x)/2))/256 + (99*sin((17*c)/2 + (17*d*x)/2))/256)*
2i)/(715*a^4*d*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2)*1i)^13*(cos(c/2 + (d*x)/2)*1i + sin(c/2 + (d*x)/2))^5)